home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / x11 / networke / xfirepow.000 / xfirepow / xfirepower-0.84 / client / libsprite / data.c < prev    next >
C/C++ Source or Header  |  1995-05-26  |  4KB  |  164 lines

  1. #include <X11/Xlib.h>
  2. #include <X11/Xutil.h>
  3. #include <X11/Xmu/CurUtil.h>
  4. #include <X11/cursorfont.h>
  5. #include <X11/keysym.h>
  6.  
  7. #include <assert.h>
  8. #include <string.h>
  9.  
  10. #ifdef XPM
  11. #ifdef HACKED_XPMLIB
  12. #include "xpmlib-3.4b/xpm.h"
  13. #else 
  14. #include <xpm.h>
  15. #endif /*HACKED_XPMLIB*/
  16. #endif /*XPM [BDyess]*/
  17.  
  18. #include "Wlib.h"
  19. #include "libsdata.h"
  20. #include "libsstruct.h"
  21.  
  22. int    nplanes=3;
  23. int    xpmORplanes = 4;
  24. unsigned long    base;
  25. unsigned long planes[MAXPLANES];
  26. XColor    allocated_colors[1<<MAXPLANES];
  27. int    nallocated_colors = -1;
  28.  
  29. char *_nfonts[] = {
  30.     NORMAL_FONT,
  31.     "-*-clean-medium-r-normal--10-100-75-75-c-60-*",
  32.     "fixed",
  33.     NULL,
  34. };
  35. char *_bfonts[] = {
  36.     BOLD_FONT,
  37.     "-*-clean-bold-r-normal--10-100-75-75-c-60-*",
  38.     "fixed",
  39.     NULL,
  40. };
  41. char *_ifonts[] = {
  42.     ITALIC_FONT,
  43.     "-*-clean-bold-r-normal--10-100-75-75-c-60-*",
  44.     "fixed",
  45.     NULL,
  46. };
  47. char *_bgfonts[] = {
  48.     BIG_FONT,
  49.     "-*-lucidatypewriter-*-*-*-*-40-*-*-*-*-*-*-*",
  50.     "fixed",
  51.     NULL,
  52. };
  53.  
  54. int zero = 0;
  55. int one = 1;
  56. int two = 2;
  57. int three = 3;
  58.  
  59. GC maskGC; /* JJJ */
  60.  
  61. /* GC used for drawing the borders [BDyess] */
  62. GC borderGC;
  63. int     controlkey = 0;
  64. #define    BillsScrewyAltMask    (Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)
  65. int     altkey = 0;
  66. int     W_FastClear = 0;
  67. #ifdef CONTINUOUS_MOUSE
  68. int     buttonDown = 0;
  69. #endif                /* CONTINUOUS_MOUSE */
  70. Display *W_Display;
  71. Window  W_Root;
  72. Colormap W_Colormap;
  73. int     W_Screen;
  74. #ifdef FOURPLANEFIX
  75. Visual *W_Visual;
  76. #endif
  77. W_Font  W_BigFont = (W_Font) & zero, W_RegularFont = (W_Font) & one;
  78. W_Font  W_HighlightFont = (W_Font) & two, W_UnderlineFont = (W_Font) & three;
  79. W_Color W_White = WHITE, W_Black = BLACK, W_Red = RED, W_Green = GREEN;
  80. W_Color W_Green2 = GREEN2, W_Blue = BLUE, W_DarkGreen = DARKGREEN, W_Brown = BROWN;
  81. W_Color W_Yellow = YELLOW, W_Cyan = CYAN, W_Grey = LIGHT_GREY, W_DarkGrey = DARK_GREY;
  82. int     W_Textwidth, W_Textheight, W_BigTextwidth, W_BigTextheight;
  83. char   *strdup();
  84.  
  85. int     W_in_message = 0;    /* jfy -- for Jerry's warp message hack */
  86.  
  87. #ifdef RJC
  88. extern W_Window baseWin;
  89.  XClassHint class_hint = {
  90.     "xgalaga", "XGalaga",
  91. };
  92.  
  93. XWMHints wm_hint = {
  94.     InputHint | StateHint,
  95.     True,
  96.     NormalState,
  97.     None,
  98.     None,
  99.     0, 0,
  100.     None,
  101.     None,
  102. };
  103.  
  104. XSizeHints wm_size_hint;
  105. #endif                /* RJC */
  106.  
  107. W_Event W_myevent;
  108. int W_isEvent = 0;
  109.  
  110. struct colors colortable[12] = {
  111.     {"white"},
  112.     {"black"},
  113.     {"red"},
  114.     {"green"},
  115.     {"yellow"},
  116.     {"cyan"},
  117.     {"#969696"},    /* dark grey */
  118.     {"#c8c8c8"},    /* light grey */
  119.     {"green2"},
  120.     {"blue"},
  121.     {"#004000"},
  122.     {"#ff8800"},
  123. };
  124.  
  125. struct windowlist *hashtable[HASHSIZE];
  126. struct fontInfo fonts[FONTS];
  127.  
  128. struct window myroot;
  129.  
  130. unsigned char gray[] = {
  131.     0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55,
  132.     0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55,
  133.     0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55,
  134.     0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55
  135. };
  136.  
  137. unsigned char striped[] = {
  138.     0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff,
  139.     0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f,
  140.     0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00,
  141.     0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0
  142. };
  143.  
  144. unsigned char solid[] = {
  145.     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  146.     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  147.     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  148.     0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
  149. };
  150.  
  151. int forceMono = 0;
  152.  
  153. int xpm = 1, useOR = 1;
  154.  
  155. int backColor;
  156.  
  157. char *imagedir= 0;
  158.  
  159. int verbose_image_loading = 0;
  160. int buttonDown;
  161.  
  162. int useBuffered = 1;
  163.  
  164.